Component({
  externalClasses: ['wr-class'],

  properties: {
    hospitalList: {
      type: Array,
      value: [],
    }
  },

  data: {
  },

  lifetimes: {
    ready() {
      // this.init();
      // console.log()
    },
  },

  methods: {
    onClickHospital(e) {
      const { index } = e.currentTarget.dataset;
      // this.triggerEvent('click', { ...e.detail, index });
      console.log({index})
      let data = this.properties.hospitalList[index]
      let url = '/pages/hospital-product-list/index?data=' + encodeURIComponent(JSON.stringify(data));

      wx.navigateTo({
        url // 跳转的页面路径
      });
    },
  },
});
